package Call_1;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Random;

public class Call {
    public static void main(String[] args) throws IOException {
        ArrayList<String> list = new ArrayList<String>();
        BufferedReader br = new BufferedReader(new FileReader("names.txt"));
        String line;
        while ( (line = br.readLine() ) != null){
            list.add(line);
        }
        br.close();
        int n = list.size();
        Random rand = new Random();
        int r = rand.nextInt(n);
        System.out.println(list.get(r));
    }
}
